<?php
	$proxyIframeSrc		= $_GET['proxyIframeSrc'];
	$iframeId 			= $_GET['iframeId'];
	$and				= '?&';
	$cssFile			= $_GET['cssFile'];
	$jsFile				= $_GET['jsFile'];
	$fromType			= $_GET['fromType'];
	
	$fromType			=	$fromType ? $fromType : '';
	if( substr_count( $proxyIframeSrc , '?') != 0 ) $and = '&q=1&';
	$proxyIframeSrc = $proxyIframeSrc . $and . 'iframeId='.$iframeId .'&q=1' ;	
	$requestType = $_GET['requestType'];
	
	$referer = $_SERVER['HTTP_REFERER'];
	if($referer){	
		$comeFrom = parse_url($referer);
		$comeFromHost =  $comeFrom['host'] ;		
		$allows = $dbs -> select('SELECT * FROM `'.DB_PRE.'allow_web` WHERE `name` = "'. $comeFromHost .'" ');
		if(count($allows) == 0 )
			exit('未经授权的网站. 禁止调用.');
	}else{
		header('Location:./');
	}
?>